<?php
class Image extends AppModel{
    public $useTable  = 'image';
    public $lang_code = 'vn';
    
    
    public function get_image($type = null, $post_id = null)
    {
        $sql = array('conditions' => array('type =' => $type, 'post_id' => $post_id));
        $image = $this->find('all', $sql);
        if(!empty($image))
            return $image;
        else
            return array();
    }
}
    